﻿<phone:PhoneApplicationPage 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:local="clr-namespace:MushroomPicker"
	xmlns:System="clr-namespace:System;assembly=mscorlib"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
	x:Class="MushroomPicker.Game"
	Orientation="Portrait"
	shell:SystemTray.IsVisible="False">
	<phone:PhoneApplicationPage.Resources>
		<Style x:Key="ButtonStyle1" TargetType="Button">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
			<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
			<Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/>
			<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/>
			<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMediumLarge}"/>
			<Setter Property="Padding" Value="10,3,10,5"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<Grid.Background>
								<ImageBrush Stretch="Fill" ImageSource="Res/button.png"/>
							</Grid.Background>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver"/>
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneBackgroundBrush}"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonBackground">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneForegroundBrush}"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonBackground">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
												<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Image x:Name="image" Source="Res/button_b.png" Stretch="Fill" Visibility="Collapsed"/>
							<Border x:Name="ButtonBackground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="0">
								<ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,0,0,23"/>
							</Border>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Storyboard x:Name="Storyboard1">
			
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ScorePanel.ScoreValue)" Storyboard.TargetName="scorePanel">
				<EasingDoubleKeyFrame KeyTime="0" x:Name="startValue" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="100" x:Name="endValue">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuadraticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			
		</Storyboard>
	</phone:PhoneApplicationPage.Resources>

	<phone:PhoneApplicationPage.FontFamily>
		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
	</phone:PhoneApplicationPage.FontFamily>
	<phone:PhoneApplicationPage.FontSize>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
	</phone:PhoneApplicationPage.FontSize>
	<phone:PhoneApplicationPage.Foreground>
		<StaticResource ResourceKey="PhoneForegroundBrush"/>
	</phone:PhoneApplicationPage.Foreground>

	<!--LayoutRoot is the root grid where all page content is placed-->
	<Grid x:Name="LayoutRoot">
		<Grid.Background>
			<ImageBrush Stretch="Fill" ImageSource="Res/gamebackground.jpg"/>
		</Grid.Background>
		<local:ScorePanel x:Name="scorePanel" Margin="172,14,8,0" VerticalAlignment="Top" d:LayoutOverrides="Height"/>
		<Grid Height="126" Margin="4,4,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="161">
			<TextBlock Margin="3,2,0,57" TextWrapping="Wrap" FontSize="48" TextAlignment="Center" FontFamily="Comic Sans MS" Foreground="Black" HorizontalAlignment="Left" Width="131"><Run Text="L"/><Run Text="evel"/></TextBlock>
			<TextBlock x:Name="textlevel1" Margin="33,53,64,6" TextWrapping="Wrap" FontSize="48" TextAlignment="Center" FontFamily="Comic Sans MS" Foreground="Black" Text="1" d:LayoutOverrides="HorizontalAlignment"/>
			<TextBlock Margin="0,0,0,59" TextWrapping="Wrap" FontSize="48" TextAlignment="Center" FontFamily="Comic Sans MS" Foreground="White" HorizontalAlignment="Left" Width="131"><Run Text="L"/><Run Text="evel"/></TextBlock>
			<TextBlock x:Name="textlevel" Margin="33,51,64,8" TextWrapping="Wrap" FontSize="48" TextAlignment="Center" FontFamily="Comic Sans MS" Foreground="White" Text="1" d:LayoutOverrides="HorizontalAlignment"/>
		</Grid>
		<Canvas x:Name="gamecanves" Margin="8,116,8,84" Width="464" Height="600">
			<local:Mushroom Height="128" Canvas.Left="24" Canvas.Top="14" Width="128"/>
			<local:Mushroom Height="128" Canvas.Left="176" Canvas.Top="12" Width="128"/>
			<local:Mushroom Height="128" Canvas.Left="328" Canvas.Top="10" Width="128"/>
			<local:Mushroom Height="128" Canvas.Left="30" Canvas.Top="156" Width="128"/>
			<local:Mushroom Height="128" Canvas.Left="168" Canvas.Top="174" Width="128"/>
			<local:Mushroom Height="128" Canvas.Left="312" Canvas.Top="148" Width="128"/>
			<local:Mushroom Height="128" Canvas.Left="32" Canvas.Top="308" Width="128"/>
			<local:Mushroom Height="128" Canvas.Left="168" Canvas.Top="310" Width="128"/>
			<local:Mushroom Height="128" Canvas.Left="308" Canvas.Top="302" Width="128"/>
			<local:Mushroom Height="128" Canvas.Left="34" Canvas.Top="443" Width="128"/>
			<local:Mushroom Height="128" Canvas.Left="168" Canvas.Top="459" Width="128"/>
			<local:Mushroom Height="128" Canvas.Left="310" Canvas.Top="439" Width="128"/>
		</Canvas>
		<CheckBox x:Name="check_Music" Content="Music" Margin="37,0,0,8" VerticalAlignment="Bottom" IsChecked="True" FontSize="32" Foreground="#FFC5D081" HorizontalAlignment="Left" Width="164" Visibility="Collapsed"/>
		<CheckBox x:Name="check_Sound" Content="EffectSound" Margin="36,0,198,8" VerticalAlignment="Bottom" IsChecked="True" FontSize="32" Foreground="#FFC5D081"/>
		<Grid x:Name="messageRect" Background="#71000000">
			<Button x:Name="btn_Go" Content="Go!" Margin="37,381,29,285" BorderThickness="0" Style="{StaticResource ButtonStyle1}" FontSize="48" Foreground="Black" BorderBrush="{x:Null}" Background="{x:Null}" Click="Go_Click"/>
            <Button x:Name="submitScore" Content="Submit" Margin="40,521,26,145" BorderThickness="0" Style="{StaticResource ButtonStyle1}" FontSize="48" Foreground="Black" Visibility="Collapsed" BorderBrush="{x:Null}" Background="{x:Null}"  Click="submitScore_Click"/>
			<TextBlock x:Name="textmessage" TextWrapping="Wrap" Text="Ready?" VerticalAlignment="Top" Margin="8,279,8,0" TextAlignment="Center" FontSize="48"/>
		</Grid>
		
	</Grid>
</phone:PhoneApplicationPage>